package GameEngine;

public class MessageQueue {
	private boolean full;  		//true se pieno false se vuoto
	private Message message[];
	
	public MessageQueue(){ 
		full=false;
		message = new Message[1];
	}
	
	public void enqueue(Message m){
		full=true;
		message[0]=m;
	}
	
	public Message dequeue(){
		Message tmp;
		full = false;
		tmp = message[0];
		message[0]=null;
	
		return tmp;
	}
	
	public boolean isEmpty(){
		if(!full)
			return true;
		else 
			return false;
	}
	
	public boolean isFull(){
		if(full)
			return true;
		else 
			return false;
	}

}
